//改变当前的state里面的值的
import { MutationTree }  from  'vuex'
const  mutations:MutationTree<any> = {
   'SET_USER'(state:any,user:object):void {
        state.user = user;
   },
   'SET_ROUTERS'(state:any,routers:any):void {
      state.routers = routers;
 }
}
export  default  mutations;


// export default mutations{
//     ## 老方法
//     SET_TOKEN(state: any, data: any) {
//          state.token = data
//     },
//  }
 
// import { MutationTree } from 'vuex'
//     ## 新方法 MutationTree<any> 相信应该有些人不理就是一个接口
// const mutations: MutationTree<any> = {
//     'SET_TOKEN'(
//         state: any,
//         data: any
//     ): void {
//         state.token = data
//     }
// }
